<?php
include_once("../../includes/config.inc.php");
check_login();
$suserSession=get_suser();
$customer_id=$suserSession['id'];

if($_REQUEST['action']=='get_group'){
    //获取用户分组
    $configModel=new Model_CustomerConfig();
    $groupMsg=$configModel->getGroups($customer_id);
    echo json_encode($groupMsg);die;
}

//获取素材
$model=D('info_common');
$type=$_GET['type'] ? $_GET['type'] : 1;
$where="customer_id='{$customer_id}' and info_type='{$type}' and is_mass=1 and state=1";
$infoList=$model->where($where)->dataArr();
if($infoList){
    foreach ($infoList as $key=>$val){
        $infoList[$key]['info_content'] = cut_str($val['info_content'],10);
        $infoList[$key]['info_title']   = cut_str($val['info_title'],10);
    }
}

$assignData['infoList'] = $infoList;
$smarty->assign($assignData);
$smarty->setTpl('member/templates/push.html')->display();